package cn.cas.mango.controller;

import cn.cas.mango.dto.Message;
import cn.cas.mango.dto.param.HotListDetailParam;

import cn.cas.mango.service.HotListDetailSearchService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;

// 已废弃
@Controller
@RequestMapping("/HotListDetail/")
@ResponseBody
@CrossOrigin
public class HotListDetailSearch {
  @Autowired
  private HotListDetailSearchService searchService;

  @GetMapping
  public Message index() {
    return Message.builder().msg("").build();
  }

  @RequestMapping(value = "cluster", method = {RequestMethod.GET})
  public Message searchAdvanced(HotListDetailParam queryParam) {
    return searchService.cluster(queryParam);
  }

  @RequestMapping(value = "cluster", method = {RequestMethod.POST})
  public Message searchAdvancedPost2(HotListDetailParam queryParam)  {
    return searchService.cluster(queryParam);
  }


}
